<?php

namespace app\models\admin\models;

use Yii;

/**
 * This is the model class for table "{{%admin_user}}".
 *
 * @property string $user_id
 * @property string $login_account
 * @property string $password
 * @property string $truename
 * @property string $last_login_time
 * @property string $last_login_ip
 * @property string $login_count
 * @property string $memo
 * @property string $status
 * @property string $last_modify
 * @property string $disabled
 */
class AdminUser extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%admin_user}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['login_account', 'password', 'last_modify'], 'required'],
            [['last_login_time', 'login_count', 'last_modify','auth_invite'], 'integer'],
            [['memo', 'code'], 'string'],
            [['login_account', 'truename'], 'string', 'max' => 30],
            [['password'], 'string', 'max' => 128],
            [['last_login_ip'], 'string', 'max' => 20]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'user_id' => 'User ID',
            'login_account' => 'Login Account',
            'password' => 'Password',
            'truename' => 'Truename',
            'last_login_time' => 'Last Login Time',
            'last_login_ip' => 'Last Login Ip',
            'login_count' => 'Login Count',
            'memo' => 'Memo',
            'status' => 'Status',
            'last_modify' => 'Last Modify',
            'disabled' => 'Disabled',
            'code' => 'Code',
            'auth_invite' => 'Auth Invite',
        ];
    }
}
